package org2.jogo.activities;

import org2.jogo.R;
import android.accounts.*;
import android.os.Bundle;

public class InstrucoesActivity extends GameActivity {

    /**
     * Tentativa de logar no twitter pra mandar mensagem do tipo "Rodrigo conseguiu 90 pontos no Quiz Game!", mas não
     * deu tempo de continuar
     */
    public void twitter() {
        AccountManager am = AccountManager.get(this);
        Account[] accts = am.getAccountsByType("com.twitter.android.auth.login");
        if (accts.length > 0) {
            String typeToken = "com.twitter.android.oauth.token";
            String typeSecret = "com.twitter.android.oauth.token.secret";
            Account acct = accts[0];
            am.getAuthToken(acct, typeToken, null, this, new AccountManagerCallback<Bundle>() {
                public void run(AccountManagerFuture<Bundle> arg0) {
                    try {
                        // Bundle b = arg0.getResult();
                        // String token = b.getString(AccountManager.KEY_AUTHTOKEN);
                        // String userName = b.getString(AccountManager.KEY_ACCOUNT_NAME);
                    }
                    catch (Exception e) {
                    }
                }
            }, null);
            am.getAuthToken(acct, typeSecret, null, this, new AccountManagerCallback<Bundle>() {
                public void run(AccountManagerFuture<Bundle> arg0) {
                    try {
                        // Bundle b = arg0.getResult();
                        // String secret = b.getString(AccountManager.KEY_AUTHTOKEN);
                    }
                    catch (Exception e) {
                    }
                }
            }, null);
        }

    }

    @Override
    protected int getContentView() {
        return R.layout.instrucoes;
    }

    @Override
    protected int getMusicaFundo() {
        return 0;
    }

    @Override
    protected String getTitulo() {
        return "Instruções";
    }
}
